package com.example.Annocation.Configeration;

import com.example.Annocation.commons.Student;
import org.springframework.context.annotation.*;

/**
 * @Description TODO
 * @Date 2024/5/14 16:09
 * @Created by houjunfeng
 */
@Configuration
public class StudentConfiguration {
    //默认bean名字为方法名 如果bean写了名字就用这个名字
    @Bean(name = {"student01"})
    public Student getStudent(){
        System.out.println("开始创建student的bean");
        return new Student("李四",35,22);
    }
}
